﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _6
{
    class Program
    {
        private int x = 0;
        private int y = 0;
        public int X
        {
            get
            {
                return x;
            }
            set
            {
                x = value;
            }
        }
        public int Y
        {
            get
            {
                return y;
            }
            set
            {
                y = value;
            }
        }
        public int add()
        {
            return X + Y;
        }
    }
    class oppo : Program
    {
        private int z;
        public int Z
        {
            get
            {
                return z;
            }
            set
            {
                z = value;
            }
        }
        public int add2()
        {
            return X + Y + Z;
        }
    };
    class compute
    {
        static void Main(string[] args)
        {
            oppo a=new oppo();
            a.X = 3;
            a.Y = 4;
            a.Z = 5;
            Console.WriteLine(a.add2());
            

        }
    };
}
